﻿using System;
using System.Windows;
using System.Windows.Controls;
namespace Burglar.Controls
{
    /// <summary>
    /// Interaction logic for DomensePanel.xaml
    /// </summary>
    public partial class PalacePanel : UserControl
    {

        public static readonly RoutedEvent NotificationRecivedEvent = EventManager.RegisterRoutedEvent(
            "Notificate", RoutingStrategy.Direct, typeof(RoutedEventHandler), typeof(PalacePanel));

        public event RoutedEventHandler Notificate
        {
            add { AddHandler(NotificationRecivedEvent, value); }
            remove { RemoveHandler(NotificationRecivedEvent, value); }
        }
       
        public String PalaceName {
            get { return LblPalaceName.Content.ToString(); }
            set { LblPalaceName.Content = value; }
        }

        public String ActivityName{
            get { return LblActivity.Content.ToString(); }
            set { 
                LblActivity.Content = value;
                LblActivity.ToolTip = value;
            }
        }

        public String BurglarName{
            get { return LblBurglarName.Content.ToString(); }
            set { LblBurglarName.Content = value; }
        }

        public PalacePanel()
        {
            InitializeComponent();
        }

        public PalacePanel(String p)
        {
            InitializeComponent();
            PalaceName = p;
        }

        private void BtnClose_Click(object sender, RoutedEventArgs e)
        {
            ((Panel)Parent).Children.Remove(this);
        }

        private void BtnChangeState_Click(object sender, RoutedEventArgs e)
        {

        }
    }
}
